package com.yidao.template.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.yidao.core.domain.BaseDomainObject;
import com.yidao.user.domain.User;

@Entity
@Table(name="templates")
@Inheritance(strategy=InheritanceType.JOINED)
public class Template extends BaseDomainObject{

	private static final long serialVersionUID = 1L;
	
	private String name;
	
	//private int version;
	
	private String description;
	
	private String fileName;

	private User createUser;
	
	@ManyToOne
	@JoinColumn(name="create_user_id")
	public User getCreateUser(){
		return createUser;
	}

	@Column
	public String getDescription() {
		return description;
	}
	
	@Column(nullable=false)
	public String getFileName() {
		return fileName;
	}
	
	@Column
	public String getName() {
		return name;
	}
	
	public void setCreateUser(User createUser) {
		this.createUser = createUser;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public void setName(String name) {
		this.name = name;
	}
}
